﻿public class Demo
{
    static bool IsLeapYear(int year)
    {
        return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
    }

    static void Main()
    {
        Console.Write("请输入一个年份: ");
        int year = int.Parse(Console.ReadLine());
        
        if (IsLeapYear(year))
        {
            Console.WriteLine($"{year}年是闰年");
        }
        else
        {
            Console.WriteLine($"{year}年不是闰年");
        }
    }
}